Code and Data Repository for Skitka et al. (2024): Internal-Wave Dissipation Mechanisms and Vertical Structure in a High-Resolution Regional Ocean Model

The following are the Python and Matlab plot routines used to generate the (sub)figures in Skitka et al. (2024):
./Comparison/plot_profiles_all.py
./Comparison/plot_profiles_bg_off.py
./Comparison/plot_profiles_leith_off.py
./Comparison/plot_profiles_cases.py
./decomp/kpp_back_off_leith_div_off/plot_variance_profiles.py
./tile/high_res/kpp_back_off_leith_div_off/plot_variance_profiles.py
./bathymetry/plot_depth_map.m (data hard-coded from load_kunze.m)
./cfl/plot_cfl_leith.m

./python_src: This is a library of Python code.  Its path must specified as mypythondir in the various mkfolders#.sh scripts in the ./intermediate_processing code. 

./aux_data: There are some grid files that need to be referenced to by the variable auxdir in the various mfolders#.sh in ./intermediate_processing

./pollmann and ./kunze list links to the data from Pollmann et al. (2017) and Kunze (2017).

Instructions for post processing raw data using ./intermediate_processing:
The following links must be made in mkfolders#.sh to replicate the post processing of the source code, as well as in the various "plot_[x].py" routines used to generate the figures used in this publication:
mypythondir = "./python_src/"
datadir = [raw model output]
tmpdir = [tmp directory to hold large amounts (10's of TB) of data]
auxdir = "./aux_data/[high/low]_res/"
savedir = [directory to store figures]
Run mkfolders0.sh-mkfolders2.sh in each subdirectory of ./decomp and ./tile.  For the tile cases, gnu_run_tile.sh will need to be executed first, otherwise, execute gnu_run_decomp.sh, gnu_run_field_snapshots.sh, and gnu_run_profiles.sh in that order.  Then run the plot directories with python - this will save the intermediate data that is used by ./Comparison/*.py to plot the final figures used in Skitka et al. (2024), specifically python plot_profiles.py and plot_variance_profiles.py.  Intermediate figures are saved into the "savedir" directory.

Instructions for running the high-resolution numerical simulations:
An MITgcm hydrostatic run (publicly available at http://mitgcm.org/public/source_code.html) must be set up according to the parameters described in Nelson et al. (2020) and Skitka et al. (2024) with the modified source code to disable the divergent part that the Leith viscosity scheme acts on given in ./MITgcm_Leith_Mods/. See ./MITgcm_Leith_Mods/readme.txt.  Boundary conditions from he appropriate LLC4320 global simulation must be extracted from https://data.nas.nasa.gov/ecco/.  